<extend name="Public:base" />
<block name="content">

<div class="container-fluid">

	<!-- BEGIN PAGE HEADER-->   

	<div class="row-fluid">

		<div class="span12">
			
            <div class="color-panel hidden-phone">

                <div class="color-mode-icons icon-color"></div>

                <div class="color-mode-icons icon-color-close" style="display: none;"></div>

                <div class="color-mode" style="display: none;">

                    <p>THEME COLOR</p>

                    <ul class="inline">

                        <li class="color-black color-default current" data-style="default"></li>

                        <li class="color-blue" data-style="blue"></li>

                        <li class="color-brown" data-style="brown"></li>

                        <li class="color-purple" data-style="purple"></li>

                        <li class="color-grey" data-style="grey"></li>

                        <li class="color-white color-light" data-style="light"></li>

                    </ul>

                    <label>

                        <span>Layout</span>

                        <select class="layout-option m-wrap small">

                            <option value="fluid" selected="">Fluid</option>

                            <option value="boxed">Boxed</option>

                        </select>

                    </label>

                    <label>

                        <span>Header</span>

                        <select class="header-option m-wrap small">

                            <option value="fixed" selected="">Fixed</option>

                            <option value="default">Default</option>

                        </select>

                    </label>

                    <label>

                        <span>Sidebar</span>

                        <select class="sidebar-option m-wrap small">

                            <option value="fixed">Fixed</option>

                            <option value="default" selected="">Default</option>

                        </select>

                    </label>

                    <label>

                        <span>Footer</span>

                        <select class="footer-option m-wrap small">

                            <option value="fixed">Fixed</option>

                            <option value="default" selected="">Default</option>

                        </select>

                    </label>

                </div>

            </div>

			<h3 class="page-title">

				Blog

				 <small>Blog轮播图管理和更多</small>

			</h3>

			<ul class="breadcrumb">

				<li>

					<i class="icon-home"></i>

					<a href="index.html">首页</a> 

					<span class="icon-angle-right"></span>

				</li>

				<li><a href="/admin/lunbo/lunbo/Blog">Blog轮播图管理</a></li>

			</ul>

		</div>

	</div>

	<!-- END PAGE HEADER-->

	<!-- BEGIN PAGE CONTENT-->

	<div class="row-fluid">

		<div class="span12">

			<!-- BEGIN SAMPLE FORM PORTLET-->   

			<div class="portlet box blue tabbable">

				<div class="portlet-title">

					<div class="caption">

						<i class="icon-reorder"></i>

						<span class="hidden-480">Blog轮播图管理</span>

					</div>

				</div>

				<div class="portlet-body form">

					<div class="tabbable portlet-tabs">

						<ul class="nav nav-tabs" name="ul">

							<li class="active"><a href="#portlet_tab1" data-toggle="tab">轮播图浏览</a></li>

						</ul>

						<div class="tab-content">

							<div class="tab-pane active" id="portlet_tab1">

								<!-- BEGIN FORM-->
								<form action="#" class="form-horizontal">
									<div class="portlet-body">

										<div id="sample_2_wrapper" class="dataTables_wrapper form-inline" role="grid">
											
											<table class="table table-striped table-bordered table-hover table-full-width dataTable" id="sample_2" aria-describedby="sample_2_info">

												<thead>

													<tr role="row">
														<th class="sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 209px;">ID</th>
														<th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 259px;">标题</th>
														<th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Browser: activate to sort column descending" style="width: 276px;">轮播图</th>
														<th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 259px;">状态</th>
														<th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 179px;">位置</th>
														<th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 127px;">删除操作</th>
													</tr>

												</thead>

												

												<tbody role="alert" aria-live="polite" aria-relevant="all">
													<foreach name="data" item="vo" key="k" >
														<if condition="($k%2 eq 0)">
															<tr class="even">
														<else />
															<tr class="odd">
														</if>
														
															<td class=" ">{$vo['id']}</td>
															<td class=" sorting_1">{$vo['title']}</td>

															<td class=""><img style="width:100px;height:70px" src="{$vo['pic']}"></td>
															<td class=" "><select size="1" name="status" aria-controls="DataTables_Table_1" ><option value="1" <if condition="($vo['status'] eq 1)">selected</if>>&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;显示</option><option value="0" <if condition="($vo['status'] eq 0)">selected</if>>&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;&nbsp;---&nbsp;不显示</option></select></td>

															<td class=" sorting_1">Blog轮播图</td>

															<td name="del" class="hidden-480 "><a name="del" href="" title="删除该轮播图" class="icon-trash"> 删除</a></td>

														</tr>
													</foreach>
												</tbody>
											</table>
											
										</div>

									</div>

								</form>

								<!-- END FORM-->  

							</div>

						</div>

					</div>

				</div>

			</div>

			<!-- END SAMPLE FORM PORTLET-->

		</div>

	</div>

	<!-- END PAGE CONTENT-->         

</div>
<div id="lvjing">
</div>
<div id='tishi'>

</div>
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">

	$('select[name="status"]').change(function(){
		var id=$(this).parent().prevAll().eq('2').html();
		var status=$(this).val();
		// console.log(id);
		$.ajax({
			url:'/admin/lunbo/lunbo/Bupdate',
			data:{'id':id,'status':status},
			type:'post',
			success:function(mes){
				console.log(mes);
			}
		});
	});
		
	$('a[name="del"]').click(function(){
		var id=$(this).parent().prevAll().eq('4').html();
		var tr=$(this).parent().parent();
		$.ajax({
			url:'/admin/lunbo/lunbo/Bdel',
			data:{'id':id},
			type:'post',
			success:function(mes){
				if(mes=='yes'){
					tr.remove();
				}
			}
		});
		return false;
	});
</script>

</block>